package com.cc.moxingvoice.model;

import android.support.annotation.NonNull;

import com.cc.moxingvoice.utils.FilesUtil;

/**
 * 创建日期：2018/2/24 on 9:41
 * 描述：
 * 作者：郭士超
 * QQ：1169380200
 */

public class WinVoiceItem implements Comparable<WinVoiceItem>{

    private String id;
    private String number;
    private String name;
    private String voice;
    private String label;
    private long time;

    public WinVoiceItem(String id, String number, String name, String voice, String label) {
        this.id = id;
        this.number = number;
        this.name = name;
        this.voice = voice;
        this.label = label;

        this.time = 0;
    }

    public WinVoiceItem(String id, String number, String name, String voice, String label, long time) {
        this.id = id;
        this.number = number;
        this.name = name;
        this.voice = voice;
        this.label = label;
        this.time = time;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getVoice() {
        return voice;
    }

    public void setVoice(String voice) {
        this.voice = voice;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    @Override
    public int compareTo(@NonNull WinVoiceItem o) {  // Arrays.sort()会自动调用此方法比较
        Long long1 = this.time;
        Long long2 = o.time;
        return -long1.compareTo(long2);
    }
}
